package com.business.business.web.mapper;

import cn.hutool.json.JSONObject;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.business.business.model.NoticeAnnouncement;
import com.business.business.model.RelevantUnits;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;
import java.util.Map;

@Mapper
public interface NoticeAnnouncementMapper extends BaseMapper<NoticeAnnouncement> {

    IPage<NoticeAnnouncement> noticeAnnouncementListPageForOrg(IPage page, @Param("param") JSONObject jsonParam);

    IPage<NoticeAnnouncement> noticeAnnouncementListPageForBu(IPage page, @Param("param") JSONObject jsonParam);

    Map<String,Object> getFileField(JSONObject jsonParam);

    NoticeAnnouncement getNoticeAnnouncementById(JSONObject jsonParam);

    /**
     *获取通知公告详情
     * @param jsonParam
     * @return
     */
    List<RelevantUnits> receivingUnitList(JSONObject jsonParam);

    /**
     * 获取OldState
     * @param jsonParam
     * @return
     */
    NoticeAnnouncement getOldState(JSONObject jsonParam);
    void insertAllUnits(List<RelevantUnits> list);
}
	